# $Id: PKGBUILD 87456 2013-03-31 22:50:11Z seblu $
# Maintainer: Sébastien Luttringer
# Contributor: Marti Raudsepp <marti@juffo.org>
# Contributor: Manuel Mazzuola <origin.of@gmail.com>

pkgname=ferm
pkgver=2.1.2
pkgrel=3
pkgdesc='Tool to maintain complex firewalls'
arch=('any')
url='http://ferm.foo-projects.org/'
license=('GPL2')
depends=('iptables' 'perl')
optdepends=('ebtables' 'arptables' 'ipset')
backup=("etc/$pkgname.conf")
source=(
  "http://ferm.foo-projects.org/download/${pkgver:0:3}/$pkgname-$pkgver.tar.gz"
  "$pkgname.service")
md5sums=('bcfeae169c4e8e9a702df19f453605ed'
         '62b75692f4ce998497b2276bcda8eb05')

package() {
  # software setup
  pushd $pkgname-$pkgver
  make PREFIX="${pkgdir}/usr" install
  popd
  # systemd
  install -Dm 644 $pkgname.service \
    "$pkgdir/usr/lib/systemd/system/$pkgname.service"
  # setup default config
  install -D -m 644 "$pkgdir/usr/share/doc/ferm/examples/workstation.ferm" \
    "$pkgdir/etc/$pkgname.conf"
}

# vim:set ts=2 sw=2 et:
